﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl" xmlns:user="urn:my-scripts">
  <xsl:include href="Utils.xslt"/>
  <xsl:include href="Styles.xslt"/>

  <xsl:template name="emailheader">
    <xsl:param name="eventID" select="@EventID"/>
      <div>
        <table>
          <tr>
            <td>
              <div>
                <image src="{SSite.Url}/_layouts/images/SharePointEmails/logo.jpg" alt="Logo Inage" width="50" height="50"/>
              </div>
            </td>
            <td>
              <xsl:call-template name="headerTable-menutd"/>
              <table>
                <xsl:call-template name="menuTableStyle"/>
                <td>
                  <a href="{SList.DefaultViewUrl}">
                    <xsl:call-template name="menuLinksStyle"/>
                    View list
                  </a>
                </td>
                <xsl:if test="'{SItem}' != ''">
                    <td>
                      <a>
                        <xsl:call-template name="menuLinksStyle"/>
                        <xsl:attribute name="href">
                          <xsl:call-template name="itemViewUrl"/>
                        </xsl:attribute>
                        View <xsl:call-template name="itemType"/>
                      </a>
                    </td>
                </xsl:if>
                <td>
                  <a href="/_layouts/MySubs.aspx">
                    <xsl:call-template name="menuLinksStyle"/>
                    Manage My allerts
                  </a>
                </td>
                <td>
                  <a>
                    <xsl:attribute name="href">mailto:<xsl:value-of  select="@AdminEmail"/>?subject=Feedback about alert email&amp;body=Write your feedback</xsl:attribute>
                    <xsl:call-template name="menuLinksStyle"/>
                    Feedback
                  </a>
                </td>
                <td>
                  <a href="/_layouts/MyEmails.ashx?ID=">
                    <xsl:attribute name="href">/_layouts/SharePointEmails/MyEmails.ashx?ID=<xsl:value-of select="$eventID"/></xsl:attribute>
                    <xsl:call-template name="menuLinksStyle"/>
                    View Email In Browser
                  </a>
                </td>
              </table>
            </td>
          </tr>
        </table>
      </div>
    </xsl:template>

  <xsl:template name="emailfooter">
    <br/>
    <br/>
    <br/>
    <div>
      <xsl:call-template name="footerStyle"/>
        generated by <a href="https://sharepointemails.codeplex.com/">SharePointEmails</a>,  <xsl:value-of select="user:GetDate('dddd, dd MMMM yyyy')" />
    </div>
  </xsl:template>
  
</xsl:stylesheet>
